package com.gimi.cloud.bbp.manage.consumer.feign;

import com.gimi.cloud.bbp.common.utils.reqhead.Response;
import com.gimi.cloud.bbp.dto.log.LogMasterLoginDTO;
import com.gimi.cloud.bbp.dto.params.*;
import com.gimi.cloud.bbp.dto.prod.EcProdCategoryDTO;
import com.gimi.cloud.bbp.dto.sys.*;
import feign.Headers;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by shazhiwei on 2017/12/14.
 */
@FeignClient(name = "bbp-manage-service")
public interface SystemFeignService {

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/add", method = RequestMethod.POST)
    Response addMaster(@RequestBody AddMasterParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/edit", method = RequestMethod.POST)
    Response editMaster(@RequestBody AddMasterParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/delete", method = RequestMethod.POST)
    Response deleteMaster(@RequestBody DeleteMasterParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/login", method = RequestMethod.POST)
    Response login(@RequestBody LoginParams loginVo);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/list", method = RequestMethod.POST)
    Response getRoleList(String requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/single", method = RequestMethod.POST)
    Response getRoleSingle(RoleSingleParams requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/add", method = RequestMethod.POST)
    Response addRole(ModifySysRoleParam param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/edit", method = RequestMethod.POST)
    Response editRole(ModifySysRoleParam param);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "role/pageList", method = RequestMethod.POST)
    Response getRolePageList(RoleListParams requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/list", method = RequestMethod.POST)
    Response getList(MasterListParams requestBody);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "master/single", method = RequestMethod.POST)
    Response getMasterSingle(MasterSingleParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "auth/list", method = RequestMethod.POST)
    Response getAuthList(AuthListParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "auth/doAuth", method = RequestMethod.POST)
    Response doAuth(DoAuthParams params);

    /***菜单操作开始***/
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/list", method = RequestMethod.POST)
    Response getMenuList(SysMenuDTO menuDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/single", method = RequestMethod.POST)
    Response menuSingle(MenuSingleParams params);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/add", method = RequestMethod.POST)
    Response menuAdd(SysMenuDTO menuDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/update", method = RequestMethod.POST)
    Response menuUpdate(SysMenuDTO menuDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "menu/delete", method = RequestMethod.POST)
    Response menuDelete(SysMenuDTO menuDTO);
    /***菜单操作结束***/
	/**
     * 系统配置文件操作
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/list", method = RequestMethod.POST)
    Response getConfigList(SysConfigDTO configDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/pageList", method = RequestMethod.POST)
    Response getConfigPageList(SysConfigDTO configDTOJson);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/add", method = RequestMethod.POST)
    Response addConfig(SysConfigDTO configDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/single", method = RequestMethod.POST)
    Response getConfigSingle(SysConfigDTO configDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/update", method = RequestMethod.POST)
    Response configUpdate(SysConfigDTO configDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "config/delete", method = RequestMethod.POST)
    Response deleteConfig(SysConfigDTO configDTO);


    /***商品品类操作开始***/
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/list", method = RequestMethod.POST)
    Response getCategoryList(EcProdCategoryDTO categoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/add", method = RequestMethod.POST)
    Response categoryAdd(EcProdCategoryDTO categoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/update", method = RequestMethod.POST)
    Response categoryUpdate(EcProdCategoryDTO categoryDTO);

    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "category/delete", method = RequestMethod.POST)
    Response categoryDelete(EcProdCategoryDTO categoryDTO);
    /***商品品类操作结束***/

    /********************登录登出相关接口 End*****************************/
    /**
     * 管理员登录
     * @param loginParams 登录参数
     * @return 登录结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/login", method = RequestMethod.POST)
    Response masterLogin(LoginParams loginParams);

    /**
     * 退出登录
     * @param masterDTO
     * @return 退出结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/logout", method = RequestMethod.POST)
    Response masterLogout(SysMasterDTO masterDTO);

    /**
     * 获取用户权限信息
     * @param sysMasterDTO
     * @return 查询结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/index/permission", method = RequestMethod.POST)
    Response masterPermission(SysMasterDTO sysMasterDTO);

    /********************登录登出相关接口 End*****************************/

    /********************菜单管理相关接口 start*****************************/
    /**
     * 获取菜单树状结构
     * @param menuDTO 查询参数
     * @return 获取结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/menu/tree", method = RequestMethod.POST)
    Response getMenuTree(SysMenuDTO menuDTO);

    /**
     * 获取菜单信息
     * @param menuDTO 查询参数
     * @return 获取结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/menu/info", method = RequestMethod.POST)
    Response getMenu(SysMenuDTO menuDTO);

    /**
     * 保存菜单信息
     * @param menuDTO 待保存的菜单信息
     * @return 响应结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/menu/saveOrUpdate", method = RequestMethod.POST)
    Response saveMenu(SysMenuDTO menuDTO);

    /**
     * 删除菜单信息
     * @param menuDTO 待删除的菜单
     * @return 响应结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/menu/delete", method = RequestMethod.POST)
    Response deleteMenu(SysMenuDTO menuDTO);
    /********************菜单管理相关接口 end*****************************/

    /********************管理员管理相关接口 Start*****************************/
    /**
     * 获取管理员列表
     * @param masterDTO 查询参数
     * @return 查询结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/master/list", method = RequestMethod.POST)
    Response getMasterList(SysMasterDTO masterDTO);

    /**
     * 根据id获取管理员信息
     * @param masterDTO 查询参数
     * @return 获取结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/master/info", method = RequestMethod.POST)
    Response getMasterInfo(SysMasterDTO masterDTO);

    /**
     * 保存管理员信息
     * @param masterDTO 待保存的管理员信息
     * @return 保存结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/master/saveOrUpdate", method = RequestMethod.POST)
    Response saveMaster(SysMasterDTO masterDTO);

    /**
     * 删除管理员信息
     * @param masterDTO 待删除的管理员信息
     * @return 保存结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/master/delete", method = RequestMethod.POST)
    Response deleteMaster(SysMasterDTO masterDTO);
    /********************管理员管理相关接口 End*****************************/

    /********************角色相关接口 End*****************************/
    /**
     * 获取角色列表
     * @param roleDTO 查询参数
     * @return 查询结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/role/list", method = RequestMethod.POST)
    Response getRoleList(SysRoleDTO roleDTO);

    /**
     * 根据id获取角色信息
     * @param roleDTO 查询参数
     * @return 获取结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/role/info", method = RequestMethod.POST)
    Response getRoleInfo(SysRoleDTO roleDTO);

    /**
     * 保存角色信息
     * @param roleDTO 待保存的角色信息
     * @return 保存结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/role/saveOrUpdate", method = RequestMethod.POST)
    Response saveRole(SysRoleDTO roleDTO);

    /**
     * 删除角色信息
     * @param roleDTO 待删除的角色信息
     * @return 保存结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/role/delete", method = RequestMethod.POST)
    Response deleteRole(SysRoleDTO roleDTO);
    /********************角色相关接口 End*****************************/

    /********************授权相关接口 End*****************************/
    /**
     * 获取角色对应的菜单列表
     * @param authorityDTO 查询参数
     * @return 查询结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/auth/roleMenus", method = RequestMethod.POST)
    Response roleMenus(SysAuthorityDTO authorityDTO);
    /**
     * 针对角色授权
     * @param authorityDTO 授权参数
     * @return 授权结果
     */
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/sys/auth/doAuth", method = RequestMethod.POST)
    Response doAuth(SysAuthorityDTO authorityDTO);
    /********************授权相关接口 End*****************************/



    /********************登录日志相关接口 End*****************************/
    @Headers({"Content-Type: application/json","Accept: application/json"})
    @RequestMapping(value = "/log/masterLogin/list", method = RequestMethod.POST)
    Response getLogMasterLoginList(LogMasterLoginDTO masterLoginDTO);

    /********************登录日志接口 End*****************************/




}
